<?php
namespace app\index\controller;

use \think\facade\View;
use \think\facade\Request;

class order{
    public function orderList()
    {
        $where=[];
        $cid=Request::param('cid');
        $keywords=Request::param('keywords');
        $time1=Request::param('time1');
        $time=Request::param('time');
        $price=Request::param('price');
        $price1=Request::param('price1');
        if ($cid<>''&&isset($cid)) $where['status']=$cid;
        if ($keywords<>''&&isset($keywords)) $where['aname']=$keywords;
        if ($time<>''&&isset($time) and $time1<>''&&isset($time1)) $where['addtime']=$time;
        if ($time<>''&&isset($time) and $time1<>''&&isset($time1)) $where['addtime']=$time1;
        if ($price<>''&&isset($price) and $price1<>''&&isset($price1)) $where['price']=$price;
        if ($price<>''&&isset($price) and $price1<>''&&isset($price1)) $where['price']=$price1;

        $order1=\app\index\model\order::order1();
        $order=\app\index\model\order::order($where);
        View::assign('order',$order);
        View::assign('order1',$order1);
        return View::fetch('order/order_list');
    }
    public function orderDetail()
    {
        return View::fetch('order/order_detail');
    }
}